import axios from "axios";
const isDev=process.env.NODE_ENV=="development"
const instance = axios.create({
    baseURL:isDev?"http://47.94.6.186:3001":"http://xxx/api",
    
})
instance.interceptors.request.use((config)=>{
        if(localStorage.getItem("token")){
            config.headers.token=localStorage.getItem("token")
        }
        return config
    },(err)=>{
        return Promise.reject(err)
    })
export default instance;